package dk.pun.dums.client.event;

import com.google.gwt.event.shared.GwtEvent;

public class SystemMessageUpdatedEvent extends GwtEvent<SystemMessageEventHandler> {

	public static final Type<SystemMessageEventHandler> TYPE = new Type<SystemMessageEventHandler>();

	private final transient String message;

	public SystemMessageUpdatedEvent(final String message) {
		super();
		this.message = message;
	}

	public String getMessage() {
		return this.message;
	}

	@Override
	public Type<SystemMessageEventHandler> getAssociatedType() {
		return TYPE;
	}

	@Override
	protected void dispatch(final SystemMessageEventHandler handler) {
		handler.onSystemMessageUpdated(this);
	}

}
